package com.bootdo.clouddo.domain.article;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Entity
@Table(name = "article")
public class ArticleDO implements Serializable {

    private static final long serialVersionUID = 8210062196544524623L;

    @Id
    @Column(name="ID",length=50, unique=true)
    private Long id;
    @Column(name = "site_id",columnDefinition = "bigint COMMENT '站点Id'")
    private Long siteId;
    @Column(name = "title",columnDefinition = "NVARCHAR(100) COMMENT '标题'")
    private String title;
    @Column(name = "type",columnDefinition = "NVARCHAR(1000) COMMENT '类型'")
    private String type;
    @Column(name = "introduce",columnDefinition = "NVARCHAR(500) COMMENT '简介'")
    private String introduce;
    @Column(name = "author",columnDefinition = "NVARCHAR(500) COMMENT '作者'")
    private String author;

    @Column(name = "author_id",columnDefinition = "NVARCHAR(50) COMMENT '作者'")
    private String authorId;

    @Column(name = "author_avatar",columnDefinition = "NVARCHAR(500) COMMENT '作者'")
    private String authorAvatar;

    @Column(name = "pic",columnDefinition = "NVARCHAR(200) COMMENT '封面图片'")
    private String pic;
    @Column(name = "public_time",columnDefinition = "datetime COMMENT '发布时间'")
    private Date publicTime;
    @Column(name = "link_url",columnDefinition = "NVARCHAR(200) COMMENT '原文链接地址'")
    private String linkUrl;
    @Column(name = "good_count",columnDefinition = "int COMMENT '点赞数'")
    private Integer goodCount;
    @Column(name = "read_count",columnDefinition = "int COMMENT '阅读数'")
    private Integer readCount;
    @Column(name = "create_time",columnDefinition = "datetime COMMENT '创建时间'")
    private Date createTime;
    @Column(name = "status")
    private Integer status;

    private ArticleDetailDO detail;

    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    public String getIntroduce() {
        return introduce;
    }
    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }
    public String getAuthor() {
        return author;
    }
    public void setAuthor(String author) {
        this.author = author;
    }
    public Date getPublicTime() {
        return publicTime;
    }
    public void setPublicTime(Date publicTime) {
        this.publicTime = publicTime;
    }
    public String getLinkUrl() {
        return linkUrl;
    }
    public void setLinkUrl(String linkUrl) {
        this.linkUrl = linkUrl;
    }
    public Integer getGoodCount() {
        return goodCount;
    }
    public void setGoodCount(Integer goodCount) {
        this.goodCount = goodCount;
    }
    public Integer getReadCount() {
        return readCount;
    }
    public void setReadCount(Integer readCount) {
        this.readCount = readCount;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    public Long getSiteId() {
        return siteId;
    }
    public void setSiteId(Long siteId) {
        this.siteId = siteId;
    }
    public String getPic() {
        return pic;
    }
    public void setPic(String pic) {
        this.pic = pic;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }

    public String getAuthorId() {
        return authorId;
    }

    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }

    public String getAuthorAvatar() {
        return authorAvatar;
    }

    public void setAuthorAvatar(String authorAvatar) {
        this.authorAvatar = authorAvatar;
    }

    public ArticleDetailDO getDetail() {
        return detail;
    }

    public void setDetail(ArticleDetailDO detail) {
        this.detail = detail;
    }
}
